package com.shihb.behavioralpatterns.strategypattern;/**
 *Description:
 *Version:1.0.0
 *@author shihb
 *@date 2020/8/3 21:12
 */
public class ToyDuck extends Duck{

  public ToyDuck() {
    setDuckType("玩具鸭子");
    setFlyStrategy(new NoFly());
    setSwimStrategy(new NoSwim());

  }
}
class WildDuck extends Duck{

  public WildDuck() {
    setDuckType("野鸭子");
    setFlyStrategy(new CanFly());
    setSwimStrategy(new CanSwim());
  }
}
